package com.wantong.jianpu.adapters;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.wantong.jianpu.R;
import com.wantong.jianpu.beans.LocationBean;
import com.wantong.jianpu.models.LocationModel;

/**
 * @author PACY
 * @date 2022/5/23
 * description:
 */
public class LocationTitleAdapter extends BaseQuickAdapter<LocationBean, BaseViewHolder> {
    public LocationTitleAdapter() {
        super(R.layout.location_title_item_view);
    }

    @Override
    protected void convert(BaseViewHolder holder, LocationBean s) {
        holder.setText(R.id.title_tv,s.getName());
        if(holder.getAbsoluteAdapterPosition()==getItemCount()-1){
            holder.setTextColorRes(R.id.title_tv,R.color.fontColor);
        }else{
            holder.setTextColorRes(R.id.title_tv,R.color.blue);
        }
    }
}
